package com.bdcom.nms.NmsCollect.test.dao.Impl;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.bdcom.nms.NmsCollect.test.dao.Udao;
import com.bdcom.nms.NmsCollect.test.po.Users;
@Repository("udao")
public class UdaoImpl implements Udao{

@PersistenceContext
private EntityManager emanager;
	
@Transactional	
public Users getUsersByID(Integer uid) {
	// TODO Auto-generated method stub
	
//	EntityManagerFactory efactory=Persistence.createEntityManagerFactory("SimplePU");
//	
//	EntityManager emanager=efactory.createEntityManager();
	
	
	return emanager.find(Users.class, uid);
	
}

}
